<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>原型链 补充</title>
</head>
<body>
<script type="text/javascript">
    function Fn(){
        this.test1 = function(){
            console.log("test1()")
        }
    }

    Fn.prototype.test2 = function(){
        console.log("test2()")
    }

    var fn = new Fn()
    fn.test1()
    fn.test2()
    console.log(fn.toString())
    console.log(fn.a);
    // fn.test3()
    /*
        1.函数的显式原型指向的对象，默认是空的Object 实例对象（但Object 不满足）

    */
    console.log(Fn.prototype instanceof Object) // true
    console.log(Object.prototype instanceof Object) // false
    console.log(Function.prototype instanceof Object) // true
    /*
        2.所有函数都是Function 的实例（包含Function）
    */
    console.log(Function.prototype === Function.__proto__)
    /*
        Object 的原型对象是原型链的尽头
    */
    console.log(Object.prototype.__proto__) // null

</script>
</body>
</html>